const router = require("koa-router")();

const {
    ruleApi
} = require("../../../controller/user/rule")

const { check } = require("../../../middleware/routercheck")

// router.get("/role",getRoleApi)
router.get("/rule/:id", check("getrule"), ruleApi)
router.get("/rule", check("getrule"), ruleApi)
router.post("/rule", check("createrule"), ruleApi)
router.put("/rule/:id", check("rule","editrule"), ruleApi)
router.delete("/rule/:id", check("removerule"), ruleApi)

module.exports = router;